Digital cameras generate an array of pixels that represents an image acquired by the cameras. A very diffused format for an array of pixels is the Bayer mosaic pattern layout, which is shown in FIG. 1. In a Bayer pattern, each pixel contains information that is relative to only one color component, for instance, red, green or blue. Typically, the Bayer pattern includes a green pixel in every other space, and in each row, either a blue or a red pixel occupies the remaining spaces.
As shown in FIG. 1, there are rows that alternate green G and red pixels R, and rows that alternate green G and blue pixels B. Therefore, a Bayer image is substantially a mosaic of red, green and blue pixels, where there are twice as many green pixels as red or blue pixels. This array can accurately represent an image because the human eye is more sensitive to the green data than either the red or blue.
To better show the features of the invention, the ensuing description will be referred to Bayer images, but the same considerations apply to other kinds of images, such as black and white images or any other type of image detected by a color filter sensor of a camera.
CMOS image sensors generate images that could be affected by different kinds of noise. The main causes of badly acquired pictures are Gaussian noise, defective pixels and white tailed noise.
With Gaussian noise the assumption of AWGN (additive white gaussian noise) is quite common and it normally refers to the noise randomly covering the image data, usually generated by many factors such as dark currents, high gain values etc. With defective pixels spikes, dead pixels and generally flawed pixels are located at the same locations of the image sensor and they are always set to flawed values. In particular, dead pixels are set to values close to zero, while spikes are set to near saturation or to saturation values.
White tailed noise, this is a particular kind of noise, visible in particular under low light conditions. It causes unusually bright impulsive pixels (spikes) located at random positions of the image. The difference with the above mentioned spiked or dead pixels is due to the fact that it is not possible to build a map to track them because they always appear in random locations. Furthermore, spikes generated by this noise can be close to each other. This makes the correction process of these pixels particularly tough as more than one spike could be present in the filter mask at the same time.
In this description, pixels corrupted by white tailed noise, spiked and dead pixels will be referred as defective pixels. Consequently, this attributes to this expression a broader meaning than that commonly attributed to it in literature.
Noise level typically increases in low light conditions because the image signal has to be amplified. This is normally achieved by increasing gains in the imaging pipeline that strengthen the signal so as to yield an acceptable picture. Obviously, the gain values are applied to the image signal and to the superimposed noise as well. Hence, one cannot boost the image signal without pushing up the noise level too.
In digital cameras a color filter is placed on top of the imager. Thus each pixel is sensitive to one color component only. A color reconstruction algorithm interpolates the missing information at each location and reconstructs the full RGB image.
Noisy Bayer data appears as shown in FIG. 2. The intensities of pixels deviate from their correct value by some constant drawn from a Gaussian distribution. Furthermore, a certain number of pixels have completely flawed values. These pixels are called outliers. They usually manifest as impulsive noise spread over the Bayer data and appear as bright white or dark black points.
Especially under low light conditions, spikes can be close to each other, as shown in FIG. 3. Arrangements of noisy pixels such as the one shown in FIG. 3 are particularly tough to remove. One of the two spikes could be preserved and considered in the final weighted average for removing Gaussian noise. Furthermore, dead pixels could also be present at random locations.
Dead pixels may also appear at random locations of the Bayer data array. A pixel whose flawed value is not set to near zero or near saturation values is treated as corrupted by Gaussian noise or as normal non-extreme outlier by a Duncan filter [5].
Techniques have been developed to reduce the effects of noise to generate pleasant images in every lighting condition. Typically, the noise superimposed all over the image signal is assumed to be Gaussian distributed. This has enabled the realization of powerful filters that enhance image quality significantly [4], [6]. Unfortunately noisy pixels exist for which the assumption of Gaussian noise is not valid at all. An example of non-Gaussian noise is represented by the defective dead or spiked pixels in the image.
These defective pixels are removed by considering a map denoting their position and treating them accordingly using a defect correction algorithm. A Gaussian noise reduction filter and a defect correction algorithm efficiently remove noise. Thus, one approach for getting rid of both Gaussian noise and defective pixels consists in treating the two noises separately using two different cascaded filters. Two processing modes are possible:
i) scanning the image array twice, removing white tailed noise together with defective pixels, and Gaussian noise at each pass; and
ii) scanning the image once, processing each pixel by a different filter for removing white tailed noise together with defective pixels, and Gaussian noise.
A drawback of scanning twice the image is the slowness of the correction process of the image, while treating a scanned pixel with two filters is faster, but the filters should be adequately chosen for preventing the generation of artifacts or deletion of details of the image. Therefore, a fast method for correcting defective pixels and filtering Gaussian noise that does not generate artifacts and preserves details is needed.